<?php

namespace App\Http\Controllers\Client;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\TreatmentCategory;

class TreatmentCategoryController extends Controller
{
    protected $treatmentCategoryModel;
    //
    public function __construct()
    {
        $this->treatmentCategoryModel = new TreatmentCategory();
    }

    /**
     * 获取所有的疗程分类（首页）
     * @return mixed
     */
    public function allTreatmentCategories(){
        $res = $this->treatmentCategoryModel->getInfoList();
        return $this->success($res,'疗程分类列表信息获取成功');
    }

    /**
     * 获取疗程分类(列表页)
     */
    public function treatmentCategoryForListPage(){
        $res = $this->treatmentCategoryModel->getInfoList()->toArray();

        array_unshift($res,['name'=>'所有疗程']);
        return $this->success($res,['列表页的疗程分类获取成功']);
    }
}
